import { createApp } from 'vue'
import "@/style/reset.scss"

// 引入element-plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// 全局组件
import Header from "@/components/Header/index.vue";
import Footer from "@/components/Footer/index.vue";
import Menutop from "@/components/menu-top/index.vue";
import Search from "@/components/search/index.vue";

import App from './App.vue'
import router from './router'
//引入路由鉴权的文件
import './permisstion'
//引入pinia仓库
import pinia from '@/stores'

const app = createApp(App)

app.use(router)
app.use(ElementPlus)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
   app.component(key, component)
 }

app
   .component("Header", Header)
   .component("Footer", Footer)
   .component("Menutop",Menutop)
   .component("Search",Search)
//安装pinia仓库
app.use(pinia);
app.mount('#app')
